package com.spark.rectify

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.spark.common.BaseActivity

class RectManageProcedureActivity : BaseActivity() {
    private var rectProcedureFragment: RectProcedureFragment? = null

    companion object {
        fun actionStart(host: Activity, data: String) {
            val intent = Intent(host, RectManageProcedureActivity::class.java)
            intent.putExtra("data", data)
            host.startActivity(intent)
        }
    }

    override fun contentResId(): Int {
        return R.layout.act_container
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        intent?.apply {
            getStringExtra("data")?.apply {
                rectProcedureFragment = RectProcedureFragment.newInstance(this)
                loadRootFragment(R.id.fl_content, rectProcedureFragment!!)
            }
        }
    }

}